package com.ruizhong.centercontroll.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.ruizhong.centercontroll.entity.TButton;

import javax.websocket.EncodeException;
import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface TButtonService extends IService<TButton> {
    void saveNewButton(TButton tButton);

    void saveNewButtonList(List<Map<String, Object>> buttonList, Integer pageId, boolean isNew);

    void deleteButtonByPageId(Integer pageId);

    List<TButton> getButtonsByPageId(Integer pageId, Double pageWidth, Double pageHeight, Double aimPageWidth, Double aimPageHeight, Boolean display) throws JsonProcessingException;

    List<TButton> getButtonIdsByPageId(Integer pageId);
    void executeCommand(Map<String, Object> conditionMap, String ip) throws EncodeException, IOException;

    Integer getPageIdByButtonId(Integer mainId);
}
